//
//  QXApi.m
//  DuckAndDoc
//
//  Created by 蓝水软件 on 2017/5/10.
//  Copyright © 2017年 苏州蓝水有限公司. All rights reserved.
//

#import "QXApi.h"
@interface QXApi()

@end

@implementation QXApi

+ (void)loginInbackgroundWithAccount:(NSString *)account passWord:(NSString *)passWord  block:(QXLoginBlock)block{
    [BmobUser loginInbackgroundWithAccount:account andPassword:passWord block:^(BmobUser *user, NSError *error) {
        block(user,error);
    }];
}

+ (void)RegisterInbackgroundWithUserName:(NSString *)userName passWork:(NSString *)passWord block:(QXBooleanResultBlock)block{
    BmobUser *user = [BmobUser new];
    [user setUsername:userName];
    [user setPassword:passWord];
    [user signUpInBackgroundWithBlock:^(BOOL isSuccessful, NSError *error) {
        block(isSuccessful,error);
    }];
}


@end
